﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profile.aspx.vb" Inherits="hotels.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="ID" />
            <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                SortExpression="FirstName" />
            <asp:BoundField DataField="LastName" HeaderText="LastName" 
                SortExpression="LastName" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="TravellerName" HeaderText="TravellerName" 
                SortExpression="TravellerName" />
            <asp:ImageField DataImageUrlField="Picture" DataImageUrlFormatString="{0}" 
                HeaderText="Picture">
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" 
        SelectCommand="SELECT [ID], [FirstName], [LastName], [Description], [Picture], [TravellerName] FROM [Profile] WHERE ([TravellerName] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="TravellerName" QueryStringField="TravellerName" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <br />
    <asp:Button ID="btn_editProfile" runat="server" 
        PostBackUrl="~/editProfile.aspx" Text="Edit profile" />
    <br />
</p>
</asp:Content>
